<div id="column-right">
    <?php echo $this->element('sidebar'); ?>
</div>
<div id="content">
    <div class="box">
        <div class="box-heading" id="tab">
            <ul>
                <li>
                    <span style="color:#fff;font-size:16px;padding-left:10px">
                        <?php echo $category['ProductCategory']['name']; ?>
                    </span>
                </li>
            </ul>
        </div>
        <link href="/css/specialfont.css" type="text/css" rel="stylesheet">
        <div class="box-content">
            <?php if(!empty($list_category) && is_array($list_category)) { ?>
            <div class="box-product">
                <?php foreach ($list_category as $cat) { ?>
                <div>
                    <div class="image">
                        <?php echo $this->Html->link(
                            '<div class="product-mask-inner"></div>
                                                <div class="product-mask-inner2"></div>
                                                <div class="product-link">
                                                    <i class="fa fa-search"></i>
                                                </div>
                                                <div class="product-thumb">'.$this->Html->image(DOMAIN.'timthumb.php?w=210&h=187&zc=1&src='.$cat['ProductCategory']['images'], array('alt' => $cat['ProductCategory']['name']))."</div>",
                            array('controller' => 'Product', 'action' => 'list_product', $cat['ProductCategory']['alias']),
                            array('escape' => false, 'title' => $cat['ProductCategory']['name'], 'class' => 'product-mask')); ?>
                    </div>
                    <div class="name">
                        <?php echo $this->Html->link(
                            $cat['ProductCategory']['name'],
                            array('controller' => 'Product', 'action' => 'list_product', $cat['ProductCategory']['alias']),
                            array('title' => $cat['ProductCategory']['name'])); ?>
                    </div>
                </div>
                <?php }?>
            </div>
            <div style="clear: both"></div>
            <?php }?>
            <?php if(! $free || count($list_category) == 0) {?>
            <div class="box-product">
                <?php
                if(!empty($list_product)){
                    $count_product = count($list_product);
                    foreach($list_product as $key => $value){?>
                        <div>
                            <div class="name">
                                <?php echo $this->Html->link(
                                    $value['Product']['name'],
                                    array('controller' => 'Product', 'action' => 'detail', $value['Product']['alias']),
                                    array('title' => $value['Product']['name'])
                                ); ?>
                            </div>
                            <div class="image">
                                <?php echo $this->Html->link(
                                    '<div class="product-mask-inner"></div>
                                                <div class="product-mask-inner2"></div>
                                                <div class="product-link">
                                                    <i class="fa fa-search"></i>
                                                </div>
                                                <div class="product-thumb">'.$this->Html->image(DOMAIN.'timthumb.php?w=210&h=187&zc=1&src='.$value['Product']['images'], array('alt' => $value['Product']['name']))."</div>",
                                    array('controller' => 'Product', 'action' => 'detail', $value['Product']['alias']),
                                    array('escape' => false, 'title' => $value['Product']['name'], 'class' => 'product-mask')
                                ); ?>
                            </div>
                            <?php if(! $free) {?>
                            <div class="price"><?php echo '€'.$value['Product']['price']; ?></div>
                            <?php }?>
                            <div class="pdac">
                            <?php if(! $free) {?>
                                <?php echo $this->Html->link(
                                    'ADD TO CART',
                                    array('controller' => 'Product', 'action' => 'add_shopping_cart', $value['Product']['id']),
                                    array('title' => 'add this product to cart', 'class' => 'buy')
                                ); ?>
                            <?php }?>
                                <?php echo $this->Html->link(
                                    'DETAILS',
                                    array('controller' => 'Product', 'action' => 'detail', $value['Product']['alias']),
                                    array('title' => $value['Product']['name'], 'class' => 'detail')
                                ); ?>
                            </div>
                        </div>
                        <?php if($key % 3 == 2){?>
                            <div class="line"></div>
                        <?php } ?>
                    <?php } }  ?>
            </div>
            <?php }?>
        </div>
    </div>
    <h1 style="display: none;">3DARCSHOP - The Best of 3D Models for Architecture, 3D Models</h1>
</div>